package com.live.minclient;

import com.sun.net.httpserver.HttpServer;

import java.io.IOException;
import java.net.InetSocketAddress;

public class Main {
    public static void main(String[] args) throws IOException {
        // 创建HTTP服务器
        HttpServer server = HttpServer.create(new InetSocketAddress(9999), 0);
        
        // 使用完全兼容的实现
        server.createContext("/", new CompatibleFileHandler());
        server.createContext("/api", new CompatibleHttpHandler());
        
        server.start();
        System.out.println("Server started at http://localhost:9999");
    }
}